import os
import cocos
from cocos.euclid import Point2
# Constantes sueltas
WINDOW_WIDTH = 1024
WINDOW_HEIGHT = 768
ROWS = 20
COLUMNS = 10
SQUARE_SIZE = 29
MUSIC = True
SOUND = True

# Constante tile size
# los tiles son de 32 X 32 pixels
# las imagenes de los personajes TAMBIEN
TILE_SIZE = 32
# el half tile lo uso para centrar los objetos dentro de los tiles.
HALF_TILE_SIZE = 16
TILE_CORRECTION = 3

# Constantes del nivel
LEVEL_ORIGIN_X 	= 192
LEVEL_ORIGIN_Y 	= 32
LEVEL_WIDTH		= 608
LEVEL_HEIGHT = 704


# Paths
RESOURCES_FOLDER = 'resources'
SOUND_FOLDER = 'sounds'
FONT_FOLDER = 'fonts'
IMAGE_FOLDER = 'images'
MAP_FOLDER = 'maps'

# De esta forma los paths son independientes del SO
SOUND_PATH = os.path.join(RESOURCES_FOLDER, SOUND_FOLDER)
FONT_PATH = os.path.join(RESOURCES_FOLDER, FONT_FOLDER)
IMAGE_PATH = os.path.join(RESOURCES_FOLDER, IMAGE_FOLDER)
MAP_PATH = os.path.join(RESOURCES_FOLDER, MAP_FOLDER)

# Enemy corner scattering targets
target_red = Point2(7*TILE_SIZE, 21*TILE_SIZE)
target_orange = Point2(23*TILE_SIZE, 21*TILE_SIZE)
target_pink = Point2(23*TILE_SIZE, 2*TILE_SIZE)
target_blue = Point2(7*TILE_SIZE, 2*TILE_SIZE)

# MapLimit
limitInfX = 7
limitSupX = 23
limitInfY = 2
limitSupY = 21
maxWallDepth = 9999

BOARD_START_POINT = [0, 0]
BOARD_END_POINT = [32, 24]